ServerEvents.recipes((event) => {
    event.remove({ output: "create:sequenced_gearshift" })
    event.stonecutting("1x create:sequenced_gearshift", 'eou:basic_machine_core')//可编程齿轮箱*1
    event.remove({ output: "create:content_observer" })
    event.stonecutting("1x create:content_observer", 'eou:basic_machine_core') //智能侦测器 * 1
    event.remove({ output: "create:stockpile_switch" })
    event.stonecutting("1x create:stockpile_switch", 'eou:basic_machine_core') //存量转换器 * 1
    event.remove({ output: "create:display_board" })
    event.stonecutting("9x create:display_board", 'eou:basic_machine_core') //翻牌显示器 * 9
    event.remove({ output: "create:nixie_tube" })
    event.stonecutting("9x create:nixie_tube", 'eou:basic_machine_core') //辉光管 * 9
    event.remove({ output: "create:contraption_controls" })
    event.stonecutting("1x create:contraption_controls", 'eou:basic_machine_core') //动态结构控制器 * 1
    //矿物钻井 * 1
    event.remove({ output: "createoreexcavation:drilling_machine" })
    let inter = "eou:incomplete_drilling_machine"
    event.recipes.create.sequenced_assembly([
        'createoreexcavation:drilling_machine'
    ], 'eou:basic_machine_core', [
        event.recipes.createDeploying(inter, [inter, "create:brass_casing"]),
        event.recipes.createDeploying(inter, [inter, "minecraft:iron_block"]),
        event.recipes.createDeploying(inter, [inter, "create:precision_mechanism"]),
        event.recipes.createDeploying(inter, [inter, "eou:power_mechanism"]),
        event.recipes.createDeploying(inter, [inter, "create:brass_block"]),
        event.recipes.createDeploying(inter, [inter, "create:mechanical_drill"])
    ]).transitionalItem(inter).loops(8)
    //流体提取井 * 1
    event.remove({ output: "createoreexcavation:extractor" })
    inter = "eou:incomplete_extractor"
    event.recipes.create.sequenced_assembly([
        'createoreexcavation:extractor'
    ], 'eou:basic_machine_core', [
        event.recipes.createDeploying(inter, [inter, "create:copper_casing"]),
        event.recipes.createDeploying(inter, [inter, "minecraft:iron_block"]),
        event.recipes.createDeploying(inter, [inter, "create:precision_mechanism"]),
        event.recipes.createDeploying(inter, [inter, "eou:power_mechanism"]),
        event.recipes.createDeploying(inter, [inter, "create:brass_block"]),
        event.recipes.createDeploying(inter, [inter, "create:mechanical_drill"])
    ]).transitionalItem(inter).loops(8)
    event.remove({ output: "createindustry:coke_oven" })//焦炉
    event.smithing("createindustry:coke_oven", "minecraft:copper_block", "createdeco:cast_iron_ingot")
    event.remove({ output: "createdeco:cast_iron_ingot" })//铸铁锭
    inter = "eou:incomplete_cast_iron_ingot"
    event.recipes.create.sequenced_assembly([
        Item.of('createdeco:cast_iron_ingot').withChance(1),
        Item.of("minecraft:iron_ingot").withChance(3),
        Item.of("create:iron_sheet").withChance(2),
        Item.of("minecraft:coal").withChance(2),
        Item.of("mekanism:dust_coal").withChance(2)
    ], "minecraft:iron_ingot", [
        event.recipes.createDeploying(inter, [inter, "minecraft:coal"]),
        event.recipes.createFilling(inter, [inter, Fluid.lava(1000)]),
        event.recipes.createDeploying(inter, [inter, "minecraft:iron_ingot"]),
        event.recipes.createPressing(inter, inter),
        event.recipes.createPressing(inter, inter),
        event.recipes.createPressing(inter, inter)
    ]).transitionalItem(inter).loops(10)
    //半成品黏土球
    event.recipes.create.mixing("eou:semi_finished_clay_balls", ["8x clay_ball", "1x rainbowcompound:blazeite_ingot", "1x rainbowcompound:obsidianite_ingot"]).superheated()
    event.remove({ output: "createindustry:fireclay_ball" })//黏土球
    event.smelting("1x createindustry:fireclay_ball", 'eou:semi_finished_clay_balls')//传送带
    event.remove({ output: "createindustry:casting_basin" })
    event.remove({ output: "createindustry:casting_spout" })
    event.remove({ output: "createindustry:block_mold" })//块状注模
    event.stonecutting("1x createindustry:block_mold", "#forge:ingots/plastic")
    event.remove({ output: "createindustry:ingot_mold" })//锭状注模
    event.stonecutting("1x createindustry:ingot_mold", "#forge:ingots/plastic")
    event.remove({ output: "createindustry:blasting_mixture" })//移除工业长路的铁矿混合物
    //注册所有矿粉获取
    for (let i in global.mineral) {
        event.recipes.create.mixing("2x eou:" + global.mineral[i] + "_mixture", ["#forge:ores/" + global.mineral[i], "2x createindustry:limesand"])
        event.recipes.create.mixing(["eou:" + global.mineral[i] + "_mixture", Item.of("eou:" + global.mineral[i] + "_mixture").withChance(0.5)], ["create:crushed_raw_" + global.mineral[i], "2x createindustry:limesand"])
    }
    //所有矿物溶液的浇筑处理
    for (var i in global.metal) {
        event.recipes.create.filling("#forge:ingots/" + global.metal[i], [Fluid.of("eou:molten_" + global.metal[i], 144), "createindustry:ingot_mold"])
        inter = "eou:incomplete_" + global.metal[i] + "_block"
        event.recipes.create.sequenced_assembly([
            "#forge:storage_blocks/" + global.metal[i]
        ], "createindustry:block_mold", [
            event.recipes.createFilling(inter, [inter, Fluid.of("eou:molten_" + global.metal[i], 144)]),
        ]).transitionalItem(inter).loops(9)
    }
    //厚钢板 * 1
    event.remove({ output: "createindustry:heavy_plate" })
    inter = 'eou:incomplete_heavy_plate'
    event.recipes.create.sequenced_assembly([
        "createindustry:heavy_plate"
    ], "#forge:ingots/steel", [
        event.recipes.createDeploying(inter, [inter, "#forge:ingots/steel"]),
        event.recipes.createPressing(inter, inter),
        event.recipes.createPressing(inter, inter),
        event.recipes.createPressing(inter, inter),
        event.recipes.createPressing(inter, inter),
        event.recipes.createPressing(inter, inter)
    ]).transitionalItem(inter).loops(3)
    //钢铁构件 * 1
    event.remove({ output: 'eou:incomplete_steel_mechanism' })
    inter = 'eou:incomplete_steel_mechanism'
    event.recipes.create.sequenced_assembly([
        "createindustry:steel_mechanism"
    ], "createindustry:heavy_plate", [
        event.recipes.createDeploying(inter, [inter, "#forge:ingots/steel"]),
        event.recipes.createDeploying(inter, [inter, "#forge:ingots/aluminum"]),
        event.recipes.createDeploying(inter, [inter, "createindustry:screw"]),
        event.recipes.createDeploying(inter, [inter, "createindustry:screwdriver"]),
        event.recipes.createFilling(inter, [inter, Fluid.of("eou:molten_steel", 200)])
    ]).transitionalItem(inter).loops(2)
    //热的塑料
    event.recipes.create.compacting('eou:hot_plastic', { fluidTag: 'forge:plastic', amount: 200 }).superheated()
    //塑料
    event.remove({ output: "#forge:ingots/plastic" })
    event.recipes.create.mixing(["#forge:ingots/plastic", Fluid.water(1000)], ['eou:hot_plastic', "4x minecraft:ice"])

    //合金溶液
    event.recipes.create.mixing(Fluid.of("eou:molten_bronze", 144), [Fluid.of("eou:molten_copper", 108), Fluid.of("eou:molten_tin", 36)]).superheated()    //青铜溶液 * 144mb
    event.recipes.create.mixing(Fluid.of("eou:molten_brass", 144), [Fluid.of("eou:molten_copper", 72), Fluid.of("eou:molten_zinc", 72)]).superheated()    //黄铜溶液 * 144mb
    event.recipes.create.mixing(Fluid.of("eou:molten_electrum", 144), [Fluid.of("eou:molten_gold", 72), Fluid.of("eou:molten_silver", 72)]).superheated()    //琥珀金溶液 * 144mb
    event.recipes.create.mixing(Fluid.of("eou:molten_constantan", 144), [Fluid.of("eou:molten_copper", 72), Fluid.of("eou:molten_nickel", 72)]).superheated()    //康铜溶液 * 144mb
    //密封构件
    event.recipes.create.filling("eou:sealing_mechanism", [Fluid.of("createindustry:liquid_plastic", 200), "eou:power_mechanism"])
    //硅晶圆
    event.recipes.create.cutting([Item.of('eou:perfect_silicon_wafer').withChance(0.01), Item.of('eou:broken_silicon_wafer').withChance(0.1), Item.of('eou:damaged_silicon_wafer').withChance(0.2),Item.of('eou:standard_silicon_wafer',2).withChance(0.1),Item.of('eou:standard_silicon_wafer',1).withChance(0.5),Item.of('eou:unidentified_silicon_wafer').withChance(0.2),Item.of('eou:standard_silicon_wafer',4).withChance(0.05)],  'eou:unidentified_silicon_wafer').processingTime(10000)
    //标准硅晶圆
    event.recipes.create.cutting([Item.of('eou:standard_silicon_wafer',8),Item.of('eou:standard_silicon_wafer',8),Item.of('eou:standard_silicon_wafer',8).withChance(0.5),Item.of('eou:standard_silicon_wafer',8).withChance(0.3),Item.of('eou:standard_silicon_wafer',8).withChance(0.1)], 'eou:perfect_silicon_wafer').processingTime(2000)
    event.recipes.create.cutting([Item.of('eou:standard_silicon_wafer',4),Item.of('eou:standard_silicon_wafer',4).withChance(0.8),Item.of('eou:standard_silicon_wafer',4).withChance(0.6),Item.of('eou:standard_silicon_wafer',4).withChance(0.4),Item.of('eou:standard_silicon_wafer',4).withChance(0.2)], 'eou:broken_silicon_wafer').processingTime(4000)
    event.recipes.create.cutting([Item.of('eou:standard_silicon_wafer',2),Item.of('eou:standard_silicon_wafer',2).withChance(0.5),Item.of('eou:standard_silicon_wafer',2).withChance(0.4),Item.of('eou:standard_silicon_wafer',2).withChance(0.3),Item.of('eou:standard_silicon_wafer',2).withChance(0.1)], 'eou:damaged_silicon_wafer').processingTime(6000)

    //黑曜石合金 * 1
    event.remove({ output: 'rainbowcompound:obsidianite_ingot' })
    event.recipes.create.compacting('rainbowcompound:obsidianite_ingot', ['4x minecraft:obsidian', "minecraft:diamond", '9x #forge:plates/iron', '9x #forge:plates/copper', '2x #forge:plates/obsidian', 'create:andesite_alloy']).superheated()
    //激光晶体 * 1
    inter = 'eou:incomplete_laser_crystal'
    event.recipes.create.sequenced_assembly([
        'eou:laser_crystal'
    ], "minecraft:diamond", [
        event.recipes.createDeploying(inter, [inter, 'rainbowcompound:obsidianite_ingot']),
        event.recipes.createCutting(inter, inter),
        event.recipes.createDeploying(inter, [inter, '#forge:ingots/bronze']),
        event.recipes.createCutting(inter, inter),
        event.recipes.createDeploying(inter, [inter, '#forge:ingots/brass']),
        event.recipes.createDeploying(inter, [inter, '#forge:ingots/plastic'])
    ]).transitionalItem(inter).loops(9)
    //霜冻合金 * 1
    event.remove({ output: 'rainbowcompound:frostite_ingot' })
    event.recipes.create.compacting('rainbowcompound:frostite_ingot', [Fluid.water(1000), '9x minecraft:blue_ice', '#forge:storage_blocks/zinc', '#forge:storage_blocks/tin', '#forge:ingots/plastic']).superheated()
    //能量激发器 * 1
    inter = 'eou:incomplete_energy_exciter'
    event.recipes.create.sequenced_assembly([
        'eou:energy_exciter'
    ], '#forge:storage_blocks/redstone', [
        event.recipes.createFilling(inter, [inter, Fluid.of("eou:molten_redstone", 100)]),
        event.recipes.createFilling(inter, [inter, Fluid.of("eou:molten_sky_stone", 100)]),
        event.recipes.createDeploying(inter, [inter, 'rainbowcompound:frostite_ingot']),
        event.recipes.createDeploying(inter, [inter, 'createaddition:gold_spool']),
        event.recipes.createPressing(inter, inter),
        event.recipes.createDeploying(inter, [inter, '#forge:ingots/plastic'])
    ]).transitionalItem(inter).loops(10)
    //粘性合金 * 1
    event.remove({ output: 'rainbowcompound:slimeite_ingot' })
    event.recipes.create.compacting('rainbowcompound:slimeite_ingot', ['4x minecraft:slime_block', '9x #forge:ingots/electrum', '16x #forge:storage_blocks/clay', Fluid.of("create_things_and_misc:slime", 1000)]).superheated()
    //聚焦底片 * 1
    inter = "eou:incomplete_focusing_negative"
    event.recipes.create.sequenced_assembly([
        'eou:focusing_negative'
    ], '#forge:storage_blocks/quartz', [
        event.recipes.createDeploying(inter, [inter, '#forge:gems/quartz']),
        event.recipes.createDeploying(inter, [inter, "#forge:sand"]),
        event.recipes.createDeploying(inter, [inter, "rainbowcompound:slimeite_ingot"]),
        event.recipes.createCutting(inter, inter),
        event.recipes.createCutting(inter, inter),
        event.recipes.createDeploying(inter, [inter, '#forge:ingots/plastic'])
    ]).transitionalItem(inter).loops(8)
    //晶体管
    event.remove({ type: "pneumaticcraft:pressure_chamber", id: "pneumaticcraft:pressure_chamber/transistor" })
    //    磁铁构件 * 1
    inter = "eou:incomplete_magnet_mechanism"
    event.recipes.create.sequenced_assembly([
        'eou:magnet_mechanism'
    ], "create:electron_tube", [
        event.recipes.createFilling(inter, [inter, Fluid.of("eou:molten_redstone", 1000)]),
        event.recipes.createDeploying(inter, [inter, "#forge:storage_blocks/iron"]),
        event.recipes.createPressing(inter, inter),
        event.recipes.createPressing(inter, inter),
        event.recipes.createPressing(inter, inter),
        event.recipes.createPressing(inter, inter)
    ]).transitionalItem(inter).loops(1)
    //    磁铁机壳 * 1
    event.recipes.create.filling("eou:magnet_casing", [Fluid.of("eou:molten_redstone", 1000), 'create:brass_block'])
    //    磁铁核心 * 1
    event.custom({
        "type": "create:item_application",
        "ingredients": [
            {
                "item": "eou:magnet_casing"
            },
            {
                "item": 'eou:magnet_mechanism'
            }
        ],
        "results": [
            {
                "item": "eou:magnet_core"
            }
        ]
    })
    //    通量构件 * 1
    event.recipes.create.compacting('eou:flux_mechanism', ["pneumaticcraft:transistor", 'ae2:fluix_block', '16x ae2:matter_ball']).superheated()
    //    通量机壳 * 1
    event.custom({
        "type": "create:item_application",
        "ingredients": [
            {
                "item": 'ae2:fluix_block'
            },
            {
                "item": 'ae2:printed_calculation_processor'
            }
        ],
        "results": [
            {
                "item": "eou:flux_casing"
            }
        ]
    })
    //    通量核心 * 1
    event.custom({
        "type": "create:item_application",
        "ingredients": [
            {
                "item": "eou:flux_casing"
            },
            {
                "item": 'eou:flux_mechanism'
            }
        ],
        "results": [
            {
                "item": "eou:flux_core"
            }
        ]
    })
    event.shaped("1x eou:blast_furnace/controller", [//高炉控制器配方
        'AAA',
        'ABA',
        'AAA'
    ], {
        A: 'createindustry:fireproof_bricks',
        B: 'eou:basic_machine_core'
    })
    event.shaped("1x eou:blast_furnace/fuel_port", [//高炉燃料口配方
        'AAA',
        'ABA',
        'AAA'
    ], {
        A: 'createindustry:fireproof_bricks',
        B: "minecraft:furnace"
    })
    event.shaped("1x eou:blast_furnace/feed_port", [//高炉物料口配方
        'AAA',
        'ABA',
        'AAA'
    ], {
        A: 'createindustry:fireproof_bricks',
        B: "minecraft:chest"
    })
    event.shaped("1x eou:blast_furnace/exportation_port", [//高炉输出口配方
        'AAA',
        'ABA',
        'AAA'
    ], {
        A: 'createindustry:fireproof_bricks',
        B: "minecraft:bucket"
    })
    event.smithing("eou:arc_furnace_coil", 'eou:basic_machine_core', 'immersiveengineering:coil_hv')//电弧炉线圈
    event.smithing("eou:arc_furnace_shell", 'eou:basic_machine_core', '#forge:storage_blocks/cast_iron')//电弧炉外壳
    event.smithing("eou:electric_arc_furnace/controller", 'eou:basic_machine_core', 'create:electron_tube')//电弧炉控制器
    event.smithing("eou:electric_arc_furnace/exportation_port", 'eou:basic_machine_core', 'minecraft:trapped_chest')//电弧炉输出口
    event.smithing("eou:electric_arc_furnace/feed_port", 'eou:basic_machine_core', 'minecraft:chest')//电弧炉物料口
    event.smithing("eou:electric_arc_furnace/power_port", 'eou:basic_machine_core', '#forge:storage_blocks/redstone')//电弧炉能量口

    event.smithing("eou:laser_carver_shell", 'eou:basic_machine_core', '#forge:storage_blocks/steel')//激光雕刻器外壳
    event.smithing("eou:laser_carver/controller", 'eou:basic_machine_core', 'eou:perfect_silicon_wafer')//注册激光雕刻器控制器
    event.smithing("eou:laser_carver/exportation_port", 'eou:basic_machine_core', 'ae2:sky_stone_chest')//注册激光雕刻器输出口
    event.smithing("eou:laser_carver/feed_port", 'eou:basic_machine_core', 'ae2:smooth_sky_stone_chest')//注册激光雕刻器物料口
    event.smithing("eou:laser_carver/power_port", 'eou:basic_machine_core', 'create_new_age:carbon_brushes')//注册激光雕刻器能量口
    event.smithing("eou:laser_carver/stress_port", 'eou:basic_machine_core', 'create:rotation_speed_controller')//注册激光雕刻器应力口

    //注册燃油引擎控制器
    inter = "eou:incomplete_oil_fired_generator/controller"
    event.recipes.create.sequenced_assembly([
        'eou:oil_fired_generator/controller'
    ], 'eou:basic_machine_core', [
        event.recipes.createDeploying(inter, [inter, 'createindustry:engine_base']),
        event.recipes.createFilling(inter, [inter, { fluidTag: 'forge:lubricant', amount: 1000 }]),
        event.recipes.createDeploying(inter, [inter, 'createindustry:engine_chamber']),
        event.recipes.createDeploying(inter, [inter, 'createindustry:screw']),
        event.recipes.createDeploying(inter, [inter, 'createindustry:turbine_blade']),
        event.recipes.createDeploying(inter, [inter, 'createindustry:screwdriver'])
    ]).transitionalItem(inter).loops(8)
    //注册燃油引擎应力口
    inter = "eou:incomplete_oil_fired_generator/stress_port"
    event.recipes.create.sequenced_assembly([
        'eou:oil_fired_generator/stress_port'
    ], 'eou:basic_machine_core', [
        event.recipes.createDeploying(inter, [inter, 'createindustry:steel_mechanism']),
        event.recipes.createDeploying(inter, [inter, 'createindustry:engine_base']),
        event.recipes.createFilling(inter, [inter, { fluidTag: 'forge:lubricant', amount: 1000 }]),
        event.recipes.createDeploying(inter, [inter, 'createindustry:engine_chamber']),
        event.recipes.createDeploying(inter, [inter, 'createindustry:screw']),
        event.recipes.createDeploying(inter, [inter, 'createindustry:screwdriver'])
    ]).transitionalItem(inter).loops(8)
    event.remove({ output: 'createaddition:capacitor' })
    event.shaped('1x createaddition:capacitor', [//电容
        'A',
        'B',
        'C'
    ], {
        A: "#forge:plates/iron",
        B: "#forge:plates/copper",
        C: 'pneumaticcraft:transistor'
    })
})